/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package com.techshop.controller;
import com.techshop.model.PhoneVote;
import com.techshop.service.PhoneVoteService;
import java.util.List;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.ManagedProperty;
import javax.faces.bean.SessionScoped;

/**
 *
 * @author Hai-PC
 */
@ManagedBean(name="phoneVoteController")
@SessionScoped
public class PhoneVoteController extends AbstractController
{    
    PhoneVote selectvote = new PhoneVote();
    List<PhoneVote> listphonevote;
   
    @ManagedProperty(value="#{phoneVoteService}")
    PhoneVoteService phoneVoteService;
    
     public PhoneVoteService getPhoneVoteService() {
        return phoneVoteService;
    }

    public void setPhoneVoteService(PhoneVoteService phoneVoteService) {
        this.phoneVoteService = phoneVoteService;
    }
    public List<PhoneVote> getListphonevote() {
       
        return  getPhoneVoteService().findAll();
         
          //return null;
    }

    public void setListphonevote(List<PhoneVote> listphonevote) {
        this.listphonevote = listphonevote;
    }
    
  
    

    public PhoneVote getSelectvote() {
        return selectvote;
    }

    public void setSelectvote(PhoneVote selectvote) {
        this.selectvote = selectvote;
    }

  

   
   

   
    
   
}

